﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Demo.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>登陆</title>
    <link href="Content/bootstrap.css" rel="stylesheet" />

    <style>
        label {
            width: 100px;
        }

        .title {
            height: 100px;
            display: flex;
            justify-content: center;
            align-content: center;
            font-weight: bold;
            font-size: 40px;
        }
    </style>
</head>

<body>

    <form id="form1" runat="server">
   <h1>更改2</h1>
        <div class="container form-horizontal" style="width: 300px; margin: 50px auto;">
            <div class="row ">
                <legend class="title">登陆</legend>
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-4 control-label">用户名：</label>
                    <div class="col-sm-8">
                        <asp:TextBox runat="server" ID="txtUserName" CssClass="form-control"></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="RetxtUserName" ControlToValidate="txtUserName"
                            ErrorMessage="账户必填" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-4 control-label">密码：</label>
                    <div class="col-sm-8">
                        <asp:TextBox runat="server" ID="txtPwd" CssClass="form-control"></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="RetxtPwd" ControlToValidate="txtPwd"
                            ErrorMessage="请输入正确的密码" ForeColor="Red" Font-Bold="True" Font-Size="Medium">
                        </asp:RequiredFieldValidator>
                        <asp:Label runat="server" ID="Message" CssClass=" label" ForeColor="Red"></asp:Label>

                    </div>
                </div>
                <div class="form-group" style="display: block;">
                    <div class="col-sm-offset-2 col-sm-10 text-center">
                        <asp:Button ID="btnLogin" runat="server" CssClass="btn-dark btn-lg" Text="登陆"
                            OnClick="btnLogin_Click" />
                    </div>
                </div>
            </div>
        </div>
    </form>
    <script>
        window.onload = function () {
            setInterval(function () {
                if (<%= status %>) {
                    location = "Register.aspx"
                }
            }, 1000);
        }

    </script>
</body>

</html>
